﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace BussinessLayer
{
    public class tblHocsinh_lopcamtinhdoan
    {
        DataLayer.Data odata = new DataLayer.Data();
        public void hocsinh_lopcamtinhdoan(int id, int lctd_id, bool comat, int tp)
        {
            SqlParameter[] sp = new SqlParameter[4];
            sp[0] = new SqlParameter("@id", id);
            sp[1] = new SqlParameter("@lopcamtinhdoan_id", lctd_id);
            sp[2] = new SqlParameter("@comat", comat);
            sp[3] = new SqlParameter("@type", tp);
            odata.proc_TS("tblHocsinh_lopcamtinhdoan", sp);
        }
        public DataTable SelectHSCuaLCTD(int lctd_id)
        {
            return odata.view_text("SELECT * FROM hocsinh_lopcamtinhdoan AS lctd LEFT JOIN hocsinh_giaovien AS hsgv ON lctd.id=hsgv.id WHERE lctd.lopcamtinhdoan_id='" + lctd_id + "'");
        }
    }
}
